<template>
  <div>
    <h1>todos</h1>
    <input type="text" placeholder="输入任务名称-回车确认" v-model="taskName" @keyup.enter="submitTaskName()">
  </div>
</template>

<script>
export default {
    data(){
        return{
            taskName: ''
        }
    },
    methods:{
        submitTaskName(){
            this.$emit('submitTaskName', this.taskName)
        }
    }
}
</script>

<style>

</style>